/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LianBao
 * Date: 2024-09-15
 * Time: 9:04
 */
public class demo1 {
    public static void main1(String[] args) {
        MyLinkedList list = new MyLinkedList();
        list.addLast(1);
        list.addLast(1);
        list.addLast(1);

        list.addLast(4);
        list.addLast(5);

        list.addLast(1);
        list.addLast(1);
        list.addLast(1);
        list.addLast(1);

        list.addLast(5);
        list.addLast(6);
        list.addLast(7);

        list.addLast(1);
        list.addLast(1);
        list.addLast(1);
        list.print();

        list.removeAll(1);

        list.print();
        System.out.println(list.size());
    }

    public static void main2(String[] args) {
        MyLinkedList list = new MyLinkedList();
        list.addLast(1);
        list.addLast(2);
        list.addLast(3);
        list.print();
        System.out.println(list.size());
//        list.addIndex(100, 3);

    }

    public static void main(String[] args) {
        MyLinkedList list = new MyLinkedList();
        list.addLast(1);
        list.addLast(2);
        list.addLast(3);
        list.print();
        list.addIndex(100,1);
        list.print();

    }




}
